package com.kady.entity;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: kady
 * \* Date: 2021/3/31
 * \* Time: 9:45
 * \* 千峰JAVA2101班
 * \* Description: 餐车项实体
 * \
 */
public class CartItem extends OrderDeatil {

    /**
     * 价格小计
     */
    private double itemTotalPrice;

    public CartItem() {
    }

    /**
     * 继承订单详情实体
     */
    public CartItem(long foodId, long count, double dePrice, Food food) {
        super(foodId, count, dePrice, food);
    }

    /**
     * 计算获取小计
     */
    public double getItemTotalPrice() {
        return super.getCount() * super.getDePrice();
    }

    @Override
    public long getFoodId() {
        return super.getFoodId();
    }

    @Override
    public void setFoodId(long foodId) {
        super.setFoodId(foodId);
    }

    @Override
    public long getCount() {
        return super.getCount();
    }

    @Override
    public void setCount(long count) {
        super.setCount(count);
    }

    @Override
    public double getDePrice() {
        return super.getDePrice();
    }

    @Override
    public void setDePrice(double dePrice) {
        super.setDePrice(dePrice);
    }

    @Override
    public Food getFood() {
        return super.getFood();
    }

    @Override
    public void setFood(Food food) {
        super.setFood(food);
    }



}
